<?php 
use yii\helpers\Html;
use yii\helpers\Url;
 ?>
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body >
   <!-- Page Layout here -->

   <div class="container_l" style="padding:3%;padding-top: 20px;background: #eeeeee;" >
    <!-- 第一层卡片 -->
        <div class="valign-wrapper" style="font-size: 24px;">设置 </div>
        <blockquote>
          账户设置
       </blockquote>
       <form action="<?= Url::to(['admin/setting']) ?>" method="post" >
        <div style="margin-bottom: 15px">用户名：
        <?php 
        $options = ['type'=>'text','name'=>'username','style'=>['width'=>'200px'],'value'=>$user->username,'readonly'=>'readonly'];
        echo Html::tag('input', '',$options);
         ?>          
         </div>
       <div style="margin-bottom: 15px">email：
          <?php 
        $options = ['type'=>'text','name'=>'email','style'=>['width'=>'200px'],'value'=>$user->email];
        echo Html::tag('input', '',$options);
         ?>    
       </div>
        
        <div style="margin-bottom: 15px">修改密码：<button>修改密码 </button></div>
        <blockquote>
          一般设置
       </blockquote>
        <div style="margin-bottom: 15px">站点标题：
          <?php         
        $options = ['type'=>'text','name'=>'blogname','style'=>['width'=>'200px'],'value'=>$os['blogname']];
        echo Html::tag('input', '',$options);
         ?>    
        </div>
        <div style="margin-bottom: 15px">站点简介：
          <?php         
        $options = ['type'=>'text','name'=>'introduction','style'=>['width'=>'200px'],'value'=>$os['introduction']];
        echo Html::tag('input', '',$options);
         ?>    
        </div>
        <div style="margin-bottom: 15px">站点地址： <?php         
        $options = ['type'=>'text','name'=>'siteurl','style'=>['width'=>'200px'],'value'=>$os['siteurl']];
        echo Html::tag('input', '',$options);
         ?> </div>
          <div class="switch">
            导航卡片开启：
    <label>
      off
      <?php  
      // 根据nav_card记录的value来决定switch的开关状态
        $options1 = ['type'=>'checkbox','name'=>'nav_card','style'=>['width'=>'200px'],'value'=>'display','checked'=>'checked'];
        $options2 = ['type'=>'checkbox','name'=>'nav_card','style'=>['width'=>'200px'],'value'=>'display'];
        $options=$os['nav_card']==1?$options1:$options2;
        echo Html::tag('input', '',$options);
         ?> 
   <!--    <input type="checkbox" name="nav_card" value="display" checked="checked"> -->
      <span class="lever"></span>
      on
    </label>
  </div>
        <div style="margin-top: 45px"><input type="submit" name="" value="保存"></div>
        </form>  
       </div>
     </div>
</body>
</html>
